from PyQt5 import QtWidgets

import matplotlib
matplotlib.use('Qt5Agg')
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas

class DataCanvas(QtWidgets.QLabel, FigureCanvas):
    def __init__(self, parent=None, width=6.7, height=4.4, dpi=100):
        self.fig = Figure(figsize=(width, height), dpi=dpi)
        self.ax = self.fig.add_subplot(111)
        super(DataCanvas, self).__init__(self.fig)
